import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

export default new Router({
    routes: [
        {
            path: '/',
            redirect: '/system/index/index'
        },
        {
            path: '/',
            component: () => import(/* webpackChunkName: "home" */ '../components/common/Home.vue'),
            meta: { title: '自述文件' },
            children: [
                {
                    path: '/system/index/index',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/Dashboard.vue'),
                    meta: { title: '系统首页' }
                },
                {
                    path: '/icon',
                    component: () => import(/* webpackChunkName: "icon" */ '../components/page/Icon.vue'),
                    meta: { title: '自定义图标' }
                },
                {
                    path: '/table',
                    component: () => import(/* webpackChunkName: "table" */ '../components/page/BaseTable.vue'),
                    meta: { title: '基础表格' }
                },
                {
                    path: '/tabs',
                    component: () => import(/* webpackChunkName: "tabs" */ '../components/page/Tabs.vue'),
                    meta: { title: 'tab选项卡' }
                },
                {
                    path: '/form',
                    component: () => import(/* webpackChunkName: "form" */ '../components/page/BaseForm.vue'),
                    meta: { title: '基本表单' }
                },
                {
                    // 富文本编辑器组件
                    path: '/editor',
                    component: () => import(/* webpackChunkName: "editor" */ '../components/page/VueEditor.vue'),
                    meta: { title: '富文本编辑器' }
                },
                {
                    // markdown组件
                    path: '/markdown',
                    component: () => import(/* webpackChunkName: "markdown" */ '../components/page/Markdown.vue'),
                    meta: { title: 'markdown编辑器' }
                },
                {
                    // 图片上传组件
                    path: '/upload',
                    component: () => import(/* webpackChunkName: "upload" */ '../components/page/Upload.vue'),
                    meta: { title: '文件上传' }
                },
                {
                    // vue-schart组件
                    path: '/charts',
                    component: () => import(/* webpackChunkName: "chart" */ '../components/page/BaseCharts.vue'),
                    meta: { title: 'schart图表' }
                },
                {
                    // 拖拽列表组件
                    path: '/drag',
                    component: () => import(/* webpackChunkName: "drag" */ '../components/page/DragList.vue'),
                    meta: { title: '拖拽列表' }
                },
                {
                    // 拖拽Dialog组件
                    path: '/dialog',
                    component: () => import(/* webpackChunkName: "dragdialog" */ '../components/page/DragDialog.vue'),
                    meta: { title: '拖拽弹框' }
                },
                {
                    // 国际化组件
                    path: '/i18n',
                    component: () => import(/* webpackChunkName: "i18n" */ '../components/page/I18n.vue'),
                    meta: { title: '国际化' }
                },
                {
                    // 权限页面
                    path: '/permission',
                    component: () => import(/* webpackChunkName: "permission" */ '../components/page/Permission.vue'),
                    meta: { title: '权限测试', permission: true }
                },
                {
                    path: '/404',
                    component: () => import(/* webpackChunkName: "404" */ '../components/page/404.vue'),
                    meta: { title: '404' }
                },
                {
                    path: '/403',
                    component: () => import(/* webpackChunkName: "403" */ '../components/page/403.vue'),
                    meta: { title: '403' }
                },
                {
                    path: '/donate',
                    component: () => import(/* webpackChunkName: "donate" */ '../components/page/Donate.vue'),
                    meta: { title: '支持作者' }
                },
                {
                    path: '/demo',
                    component: () => import(/* webpackChunkName: "donate" */ '../components/page/demo.vue'),
                    meta: { title: '测试页面' }
                },
                {
                    path: '/system/auth/user-list',
                    component: () => import(/* webpackChunkName: "donate" */ '../components/page/auth/admin'),
                    meta: { title: '管理员管理' }
                },
                {
                    path: '/system/auth/adminlog',
                    component: () => import(/* webpackChunkName: "donate" */ '../components/page/auth/adminlog'),
                    meta: { title: '管理员日志' }
                },
                {
                    path: '/system/auth/role-list',
                    component: () => import(/* webpackChunkName: "donate" */ '../components/page/auth/group'),
                    meta: { title: '角色组' }
                },

                {
                    path: '/system/auth/menu-list',
                    component: () => import(/* webpackChunkName: "donate" */ '../components/page/auth/rule'),
                    meta: { title: '菜单管理' }
                },
                {
                    path: '/system/cms/menu/list',
                    component: () => import(/* webpackChunkName: "donate" */ '../components/page/cms/column'),
                    meta: { title: '栏目管理' }
                },
                {
                    path: '/system/cms/news/list',
                    component: () => import(/* webpackChunkName: "donate" */ '../components/page/cms/archives'),
                    meta: { title: '内容管理' }
                },
                {
                    path: '/system/cms/mode/list',
                    component: () => import(/* webpackChunkName: "donate" */ '../components/page/cms/modelx'),
                    meta: { title: '模型管理' }
                },
                {
                    path: '/system/cms/single/list',
                    component: () => import(/* webpackChunkName: "donate" */ '../components/page/cms/page'),
                    meta: { title: '单页管理' }
                },
                {
                    path: '/system/cms/special/list',
                    component: () => import(/* webpackChunkName: "donate" */ '../components/page/cms/special'),
                    meta: { title: '专题管理' }
                },
                {
                    path: '/system/config/dict/list',
                    component: () => import(/* webpackChunkName: "dict" */ '../components/page/config/dict'),
                    meta: { title: '字典管理' }
                },

                {
                    path: '/system/config/params/list',
                    component: () => import(/* webpackChunkName: "params" */ '../components/page/config/params'),
                    meta: { title: '参数管理' }
                },

                {
                    path: '/system/config/dictsub',
                    component: () => import(/* webpackChunkName: "dictsub" */ '../components/page/config/dictsub'),
                    meta: { title: '字典数据' }
                },

                {
                    path: '/system/monitor/online/list',
                    component: () => import(/* webpackChunkName: "online" */ '../components/page/monitor/online'),
                    meta: { title: '在线用户' }
                },
                {
                    path: '/system/monitor/job/list',
                    component: () => import(/* webpackChunkName: "job" */ '../components/page/monitor/job'),
                    meta: { title: '定时任务' }
                },
                {
                    path: '/system/monitor/server/info',
                    component: () => import(/* webpackChunkName: "job" */ '../components/page/monitor/server'),
                    meta: { title: '服务监控' }
                },
                {
                    path: '/system/monitor/loginlog/list',
                    component: () => import(/* webpackChunkName: "job" */ '../components/page/monitor/logininfo'),
                    meta: { title: '登录日志' }
                },
                {
                    path: '/system/monitor/operlog/list',
                    component: () => import(/* webpackChunkName: "job" */ '../components/page/monitor/operlog'),
                    meta: { title: '登录日志' }
                },

            ]
        },
        {
            path: '/login',
            component: () => import(/* webpackChunkName: "login" */ '../components/page/Login.vue'),
            meta: { title: '登录' }
        },
        {
            path: '*',
            redirect: '/404'
        }
    ]
});
